package com.xsyz.reviewjwt.service;

import com.xsyz.reviewjwt.Dao.UserMapper;
import com.xsyz.reviewjwt.pojo.User;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xsyz
 * @created 2020-12-30   17:49
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User find(User user) {
        User user1 = userMapper.find(user);
        if(user1!=null) {
            return user1;
        }
        throw new RuntimeException("登录失败");
    }
}
